<template>
  <div class="audit-chance-view">

    <el-form
      label-position="right"
      label-width="110px"
      :inline="true"
    >

      <el-row :gutter="20" style="width:100%">

        <el-col :span="8">
          <el-form-item label="流程编号：">
            {{ detailData.processNo }}
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item label="创建时间：">
            {{ dateFormat('yyyy-mm-dd HH:MM',detailData.startTime) }}
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item label="创建人：">
            {{ detailData.initiator }}
          </el-form-item>
        </el-col>

      </el-row>

    </el-form>

    <item-title title="市场准入信息" />

    <base-info :chance-info="datas" is-audit />

  </div>
</template>

<script>
import baseInfo from '../../../chance/detail/modules/baseInfo.vue'

import {defineComponent, onMounted, reactive, toRefs, watch} from 'vue'

export default defineComponent({
  name: 'Chance',
  components: { baseInfo },
  props: {
    detailData: {
      type: Object,
      default: {}
    }
  },
  setup(props, {}) {
    var data = reactive({
      datas: {}
    })

    watch(
      () => props.detailData,
      (newval, oldval) => {
        if (newval && newval.data) {
          console.log(newval.data)
          data.datas = newval.data
        }
      },
      { immediate: true, deep: true }
    )

    onMounted(() => {
      console.log(props)
    })

    return {
      ...toRefs(data)
    }
  }
})
</script>

<style scoped>

</style>
